<?php
declare (strict_types = 1);
namespace app\index\model\order;

use think\Model;

/**
 * @mixin \think\Model
 */
class PileOrderInfo extends Model
{
    protected $pk = "id";

    /**
     * 获取订单对应交易信息最后一条记录
     * @param $orderId
     * @return array|null|Model
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    function getOrderInfo($orderId){
        return $this->where('order_id',$orderId)->order('id','desc')->find();
    }



}
